package com.pengke.pangu.service.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
 * <p>
 * 资源权限表
 * </p>
 *
 * @author lijunjie
 * @since 2025-02-14
 */
@Getter
@Setter
@ToString
@TableName("sys_permission")
@Schema(name = "SysPermission", description = "资源权限表")
public class SysPermission implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 父ID
     */
    @TableField("pid")
    @Schema(description = "父ID")
    private Integer pid;

    /**
     * 标题
     */
    @TableField("title")
    @Schema(description = "标题")
    private String title;

    /**
     * 权限编码，唯一索引
     */
    @TableField("permission_code")
    @Schema(description = "权限编码，唯一索引")
    private String permissionCode;

    /**
     * 分类：目录，菜单，按钮
     */
    @TableField("type")
    @Schema(description = "分类：目录，菜单，按钮")
    private String type;

    /**
     * 访问路径
     */
    @TableField("path")
    @Schema(description = "访问路径")
    private String path;

    /**
     * 组件路径
     */
    @Schema(description = "组件路径")
    @TableField("component_path")
    private String componentPath;

    /**
     * 组件名称
     */
    @Schema(description = "组件名称")
    @TableField("component_name")
    private String componentName;

    /**
     * 图标
     */
    @TableField("icon")
    @Schema(description = "图标")
    private String icon;

    /**
     * 是否可见，路由表用，菜单不展示
     */
    @TableField("hidden")
    @Schema(description = "是否可见，路由表用，菜单不展示")
    private Integer hidden;

    /**
     * 禁用
     */
    @TableField("disable")
    @Schema(description = "禁用")
    private Integer disable;

    /**
     * 排序
     */
    @TableField("order_id")
    @Schema(description = "排序")
    private Integer orderId;

    /**
     * 是否缓存
     */
    @TableField("keep_alive")
    @Schema(description = "是否缓存")
    private Integer keepAlive;

    /**
     * 删除状态
     */
    @TableLogic
    @TableField("deleted")
    @Schema(description = "删除状态")
    private Integer deleted;

    /**
     * 创建者
     */
    @TableField("create_user")
    @Schema(description = "创建者")
    private Integer createUser;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @Schema(description = "创建时间")
    private Date createTime;

    /**
     * 更新者
     */
    @TableField("update_user")
    @Schema(description = "更新者")
    private Integer updateUser;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @Schema(description = "更新时间")
    private Date updateTime;
}
